package com.caifu.controller;

import com.caifu.pojo.SysUser;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author tww
 * ClassName: IndexController.java、
 * createTime: 2021年03月03日 16:43:03
 **/
@Controller
public class IndexController extends AbstractController {


    /**
     * 首页
     *
     * @return
     */
    @GetMapping("/index")
    public String index(Model model) {
        SysUser user = getSysUser();
        model.addAttribute("userName",user.getUserName());
        return "index";
    }


    /**
     * 欢迎页
     *
     * @return
     */
    @RequestMapping("/welcome")
    public String welcome() {
        return "welcome";
    }



}
